

<#list CollUtil.newHashSet(CollUtil.getFieldValues(columns,'javaType')) as columnJavaType>
import ${ClassUtil.getClassName(columnJavaType, false)};
</#list>
<#if CollUtil.contains(pojoGenerateInfoEnums, PojoGenerateInfoEnum.MYBATIS_PLUS)>
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
</#if>
<#if CollUtil.contains(pojoGenerateInfoEnums, PojoGenerateInfoEnum.SWAGGER)>
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
</#if>
<#if CollUtil.contains(pojoGenerateInfoEnums, PojoGenerateInfoEnum.LOMBOK)>
import lombok.*;
import lombok.experimental.Accessors;
</#if>
<#if CollUtil.contains(pojoGenerateInfoEnums, PojoGenerateInfoEnum.JACKSON)>
import com.fasterxml.jackson.annotation.JsonProperty;
</#if>

/**
 * <#if StrUtil.isNotBlank(columns?first.tableNameComment)>${columns?first.tableNameComment}(${columns?first.tableName})<#else>${columns?first.tableName}</#if>
 *
 * @since 1.8
 */
<#if CollUtil.contains(pojoGenerateInfoEnums, PojoGenerateInfoEnum.LOMBOK)>
@Data
@ToString(callSuper=true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
</#if>
<#if CollUtil.contains(pojoGenerateInfoEnums, PojoGenerateInfoEnum.MYBATIS_PLUS)>
@TableName("${columns[0].tableName}")
</#if>
<#if CollUtil.contains(pojoGenerateInfoEnums, PojoGenerateInfoEnum.SWAGGER)>
@ApiModel(description = "<#if StrUtil.isNotBlank(columns?first.tableNameComment)>${columns[0].tableNameComment}(${columns[0].tableName})<#else>${columns[0].tableName}</#if>")
</#if>
public class ${StrUtil.upperFirst(StrUtil.toCamelCase(columns[0].tableName))} <#if CollUtil.contains(pojoGenerateInfoEnums, PojoGenerateInfoEnum.MYBATIS_PLUS)> extends BaseModel<${StrUtil.upperFirst(StrUtil.toCamelCase(columns[0].tableName))}></#if> {

    /** 版本号 */
    private static final long serialVersionUID = ${IdUtil.getSnowflakeNextIdStr()}L;
<#if columns??>

    <#list columns as column>
    <#if column.comment??>
    /** ${column.comment!} */
    </#if>
    <#if ClassUtil.getClassName(column.javaType, true) == "Date">
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    </#if>
    <#if CollUtil.contains(pojoGenerateInfoEnums, PojoGenerateInfoEnum.SWAGGER)>
    @ApiModelProperty(value = "<#if StrUtil.isNotBlank(column.comment)>${column.comment}(${StrUtil.toCamelCase(column.columnName)})<#else>${StrUtil.toCamelCase(column.columnName)}</#if>")
    </#if>
    <#if CollUtil.contains(pojoGenerateInfoEnums, PojoGenerateInfoEnum.MYBATIS_PLUS)>
    @TableField("${column.columnName}")
    </#if>
    <#if CollUtil.contains(pojoGenerateInfoEnums, PojoGenerateInfoEnum.JACKSON)>
    @JsonProperty("${StrUtil.toCamelCase(column.columnName)}")
    </#if>
    private ${ClassUtil.getClassName(column.javaType, true)} ${StrUtil.toCamelCase(column.columnName)};

    </#list>

    <#if CollUtil.contains(pojoGenerateInfoEnums, PojoGenerateInfoEnum.GETTER_SETTER)>
    <#list columns as column>
    public ${ClassUtil.getClassName(column.javaType, true)} get${StrUtil.upperFirst(StrUtil.toCamelCase(column.columnName))}() {
        return ${StrUtil.toCamelCase(column.columnName)};
    }

    public void set${StrUtil.upperFirst(StrUtil.toCamelCase(column.columnName))}(${ClassUtil.getClassName(column.javaType, true)} ${StrUtil.toCamelCase(column.columnName)}) {
        this.${StrUtil.toCamelCase(column.columnName)} = ${StrUtil.toCamelCase(column.columnName)};
    }

    </#list>
    </#if>

</#if>
}